<template>
	<view class="m30">
		<view>
			<view class="bgFff p30 mb30 c343 pore radius40" v-for="(item,index) in listData" :key="item.id">
				<view class="f28 bold">投诉类型：{{item.type}}</view>
				<view class="f26 mt10">被投诉用户昵称：{{item.complaintUserNickName}}</view>
				<view class="f26 mt10">投诉时间：{{item.createTime}}</view>
				<view class="flex-jus mt20">
					<text></text>
					<view class="">
						<u-button type="" shape="circle"
							color="#F3F3F5"
							:customStyle="{'height':'50rpx','color':'#34314F'}" @click="openUrl('/subpage/meethuangshi/complaintInfo?id='+item.id)">详情</u-button>
					</view>
				</view>
				<view class="status-img">
					<image :src="'https://hxs.dsjhs.com:553/prod-api/profile/yujian/ts_' + item.status + '.png'" mode="widthFix"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {complaintList} from '@/common/api_meethuangshi.js';
	export default {
		name:'',
		data() {
			return {
				listData:[]
			}
		},
		onLoad(option) {
			this.getComplaintList()
		},
		methods: {
			async getComplaintList(){
				uni.showLoading({
					mask:true
				})
				const userId = await this.getUserId()
				if (!userId) {
					console.log('用户信息获取失败或用户未登录')
					return
				}
				const res = await complaintList({
					userId
				})
				if(res.code == 200){
					uni.hideLoading()
					this.listData = res.data;
				}
			}
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #F7F6FF;
	}
	.status-img{
		position: absolute;
		right: 0;
		top: 0;
		image{
			width: 100rpx;
		}
	}
</style>
